#ifndef GRENADEOBJECT_H_
#define GRENADEOBJECT_H_
#include "Object.h"

class GrenadeObject : public Object
{
	float fuseTime;
	float explosionTime;
	float totalExplosionTime;
	float strength;
	bool isAlive;
	bool isExploding;
	bool explodeOnContact;
	bool isArmed;
	int explosionIndex;
	void CalculateExplosionVertices();
	public:
	GrenadeObject( TextureManager * textureManager,
				   Vector2D position, 
				   Vector2D velocity,
				   Vector2D acceleration,
				   float rotation,
				   float angularVelocity,
				   float angularAcceleration,
				   float mass,
				   float fuseTime,
				   float strength,
				   bool explodeOnContact);
	GrenadeObject( TextureManager * textureManager,
				   Vector2D position, 
				   Vector2D velocity,
				   Vector2D acceleration,
				   float rotation,
				   float angularVelocity,
				   float angularAcceleration,
				   float mass,
				   float fuseTime,
				   float strength,
				   bool explodeOnContact,
				   bool isArmed);
	virtual ~GrenadeObject();
				   
	bool IsFuseExpired();
	bool IsDone();
	void Arm();
	virtual bool ExplosionCollide(Object * object2, double elapsedTime);
	virtual void CollidedWith(Object * object2, float power, Vector2D point);
	virtual bool PreThinkEntryPoint(double elapsedTime);
	virtual bool PreDrawEntryPoint();
	virtual void ReleasingObject();
	virtual void PickingUpObject();
};
#endif /*GRENADEOBJECT_H_*/
